package com.hyy.taobao.service;

import com.hyy.taobao.api.IUserService;
import com.hyy.taobao.api.entity.User;
import com.hyy.taobao.dao.impl.UserDaoImpl;
import com.hyy.taobao.dao.IUserDao;

public class UserServiceImpl implements IUserService {
    @Override
    public boolean insertUser(User user) {
        IUserDao iUserDao = new UserDaoImpl();
        return iUserDao.insertUser(user);
    }

    @Override
    public boolean  deleteUser(User user) {
        IUserDao iUserDao = new UserDaoImpl();
        return iUserDao.deleteUser(user);
    }

    @Override
    public User userLogin(User user) {
        IUserDao iUserDao = new UserDaoImpl();
        return iUserDao.userLogin(user);
    }

    @Override
    public boolean updateUser(User user) {
        IUserDao iUserDao = new UserDaoImpl();
        return iUserDao.updateUser(user);
    }
}
